import os
import sys
from pydub import AudioSegment
from pydub.utils import mediainfo
import galscript
from Wolf_ConvertScript import WolfScript

def process_file(input_file, assets_dir):
    pack = galscript.ScriptPack(input_file, lambda idx,name,processor: WolfScript(idx,name,processor))
    pack.process()
    pack.save()

    print(f"处理完成！结果已保存到: {pack.output_file}")

if __name__ == "__main__":
    args = galscript.FileManager()  # 使用imodule中的Args类
    input_file = args.get_str("file")
    assets_dir = args.get_str("assets", "")
    process_file(input_file, assets_dir)